<?php

namespace App\Domain\Movie;
use App\Model\Movie\Domain as DomainModel;

/**
 * 用户
 *
 * - 可用于自动生成一个新用户
 *
 * @author dogstar 20200331
 */

class Domain {

    public function getList() {

        $model = new DomainModel();

        return $model->getList();
    }
    public function update($id, $newData) {
        $model = new DomainModel();
        if($id > 0) {
            return $model->update($id, $newData);
        }else{
            return $model->insert($newData);
        }
    }
    public function delete($id){
        $model = new DomainModel();
        return $model->delete($id);
    }

    public function get($id){
        $model = new DomainModel();
        return $model->get($id);
    }

}